<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\User */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="user-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'username')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'realname')->textInput(['maxlength' => true]) ?>



    <?= $form->field($model, 'telphone')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>

    <?php //echo $form->field($model, 'status')->textInput() ?>

    <?php //echo  $form->field($model, 'created_at')->textInput(['value'=>date("Y-m-d H:i:s",$model->created_at),'readonly'=>'true']) ?>

    <?php //echo $form->field($model, 'updated_at')->textInput(['value'=>date('Y-m-d H:i:s',$model->updated_at),'readonly'=>'true']) ?>


    <?php echo  $form->field($model, 'parentid')->dropDownList($allparentid,['options' => [$needSelected => ['selected' => 'selected']],['prompt'=>$needSelected]]) ?>

    <div class="form-group">
        <?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
